import Vue from 'vue'
import App from './App.vue'
import router from '@/router';
import TypeNav from '@/components/TypeNav'
import store from '@/store'
import Carousel from '@/components/Carousel'
import '@/mock/mockServer'
import 'swiper/css/swiper.css';
import "element-ui/lib/theme-chalk/index.css";
import { Button, Pagination } from 'element-ui';
import myPlugin from './plugin/MyPlugin';
import * as API from '@/api'

Vue.component(Button.name, Button);
Vue.component(Pagination.name, Pagination);
Vue.component(TypeNav.name, TypeNav)
Vue.component(Carousel.name, Carousel)
Vue.use(myPlugin, 'tgt')

new Vue({
  render: h => h(App),
  beforeCreate() {
    Vue.prototype.$bus = this
    Vue.prototype.$api = API
  },
  router,
  store
}).$mount('#app')
